<center>
    <div>
	<h3>Contest<?php echo $view_cid?> - <?php echo $view_title ?></h3>
    <p><?php echo $view_description?></p>
    <br>Start Time: <font color=#993399><?php echo $view_start_time?></font>
	End Time: <font color=#993399><?php echo $view_end_time?></font>
    <br>Start Register: <font color=green><?php echo $view_SRtime?></font>
	End Register: <font color=green><?php echo $view_ERtime?></font><br>
	Current Time: <font color=#993399><span id=nowdate > <?php echo date("Y-m-d H:i:s")?></span></font>
    Status:
	<?php
        if ($now>$ERtime) 
            echo "<span class=red>Ended</span>";
        else if ($now<$SRtime) 
            echo "<span class=red>Not Started</span>";
        else 
            echo "<span class=red>Registering</span>";
    ?>&nbsp;&nbsp;
	
	
	
	</div>
	<table id='problemset' width='90%'>
		<thead>
			
			<tr align=center class='toprow'>
				<td width='5'>
				<td style="cursor:hand" onclick="sortTable('problemset', 1, 'int');" width=10%><A><?php echo $MSG_PROBLEM_ID?></A>
				<td width='60%'><?php echo $MSG_TITLE?></td>
				<td width='10%'><?php echo $MSG_SOURCE?></td>
				<td style="cursor:hand" onclick="sortTable('problemset', 4, 'int');" width='5%'><A><?php echo $MSG_AC?></A></td>
				<td style="cursor:hand" onclick="sortTable('problemset', 5, 'int');" width='5%'><A><?php echo $MSG_SUBMIT?></A></td>
			</tr>
			</thead>
			<tbody>
			<?php 
			$cnt=0;
			foreach($view_problemset as $row){
				if ($cnt) 
					echo "<tr class='oddrow'>";
				else
					echo "<tr class='evenrow'>";
				foreach($row as $table_cell){
					echo "<td>";
					echo "\t".$table_cell;
					echo "</td>";
				}
				
				echo "</tr>";
				
				$cnt=1-$cnt;
			}
			?>
			</tbody>
			</table></center>